<template>
    <!-- 资源管理 -->
    <header>
        <div
            v-for="index in headerPage"
            @click="currentPage=index.key"
            :class="currentPage===index.key?'current':''"
            class="pointer"
        >
            {{ index.label }}
        </div>
    </header>
    <resources-data-table :currentPage="currentPage"/>
</template>

<script setup>
import ResourcesDataTable from "@/components/superAdmin/资源管理/ResourcesDataTable.vue";

const headerPage = [
    {label: '数据源', key: 'dataSource'},
    {label: '任务题库', key: 'taskQuestionBank'},
]
const currentPage = ref(headerPage[0].key)

</script>

<style scoped lang="less">
header {
    display: flex;
    height: 50px;

    background-color: #7f7f7f;

    div {
        width: 5%;
        height: 100%;
        text-align: center;
        line-height: 50px;
        color: white;
        transition: 0.4s;
    }

    .current {
        background-color: #F07928;
    }
}
</style>